<template>
  <div class="banner">
    <div class="banner-inner">
      <a-carousel class="carousel" animation-name="fade">
        <a-carousel-item v-for="item in carouselItem" :key="item.slogan">
          <div v-if="carouselItem && carouselItem.length" class="carousel-item">
            <div class="carousel-title">{{ carouselItem[0].slogan }}</div>
            <div class="carousel-sub-title">{{
              carouselItem[0].subSlogan
            }}</div>
            <img class="carousel-image" :src="carouselItem[0].image" />
          </div>
        </a-carousel-item>
      </a-carousel>
    </div>
  </div>
</template>

<script setup>
  import { computed } from 'vue';
  import { useI18n } from 'vue-i18n';
  import bannerImage from '@/assets/images/login-banner.png';

  const { t } = useI18n();
  const carouselItem = computed(() => [
    {
      slogan: '智能资产管理平台',
      subSlogan: '全生命周期管理资产，提升效率与可视化',
      image: bannerImage,
    },
    // {
    //   slogan: '统一台账与实时监控',
    //   subSlogan: '自动同步状态、位置与使用情况，数据更准确',
    //   image: bannerImage,
    // },
    // {
    //   slogan: '安全合规与成本优化',
    //   subSlogan: '阈值告警、权限管理与报表分析，降低风险与成本',
    //   image: bannerImage,
    // },
  ]);
</script>

<style lang="less" scoped>
  .banner {
    display: flex;
    align-items: center;
    justify-content: center;

    &-inner {
      flex: 1;
      height: 100%;
    }
  }

  .carousel {
    height: 100%;

    &-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100%;
    }

    &-title {
      color: var(--color-fill-1);
      font-weight: 500;
      font-size: 20px;
      line-height: 28px;
    }

    &-sub-title {
      margin-top: 8px;
      color: var(--color-text-3);
      font-size: 14px;
      line-height: 22px;
    }

    &-image {
      width: 320px;
      margin-top: 30px;
    }
  }
</style>
